package Linked;

/**
 * Created with Intellij IDEA.
 * Description;
 * User:墨琦
 * Data:2023-04-04
 * Time:21:40
 */
public class Mylist {
    public static boolean Find(int target, int [][] array) {
        if(array.length==0) return false;
        int rand=array.length-1;
        int l=array[0].length;
        int i=rand;
        for(;i>=0;i--)
        {
            if(array[i][0]<=target)
            {
                for(int j=0;j<l;j++)
                {
                    if(array[i][j]==target)
                        return true;
                }
            }
        }
        return false;
    }

    public static void main(String[] args) {
        int[][] kk=new int[][]{{1,2,8,9},{2,4,9,12},{4,7,10,13},{6,8,11,15}};
        System.out.println(Find(1,kk));
    }
}
